<?php
class Customer extends CustomerPeer
{
	function Customer()
	{
		parent::CustomerPeer();
	}
	
	
	public static function getAllCustomers($order_id)
	{
		$database = new Database();
		$query = "SELECT id FROM customer WHERE order_id=".$order_id;
		$result = $database->query($query);
		$ids = $database->fetch_array($result);
		$customers = array();
		foreach ($ids as $id) {
			$customer = new Customer();
			$customer->select($id['id']);
			$customers[] = $customer;
		}
		return $customers;
	}
}
?>